<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>

        function  judge (num){
            if(num == 0){
                return 'finished'
            }
            return judge(num - 1)
        }
        judge(10)
    </script>
</body>
</html>